<template>
  <div class="app-container">
    <el-button @click="addPlanInfo">test</el-button>
    <el-table :data="planInfoList">
      <!-- 添加序号列 -->
      <el-table-column
        label="序号"
        type="index"
        width="50"
        align="center"
        index-method="indexMethod"
      />

      <el-table-column label="预算编号" align="center" prop="bgId">
        <template slot-scope="scope">
          <el-input v-model="scope.row.bgId" style="budGetSty" />
        </template>
      </el-table-column>
      <el-table-column label="产品编号" align="center" prop="prodId" />
      <el-table-column label="规格" align="center" prop="size" />
      <el-table-column label="税率" align="center" prop="taxRate" />
      <el-table-column label="预算单价" align="center" prop="bdgSinglePrice" />
      <el-table-column label="需求数量" align="center" prop="reqNumber" />
      <el-table-column label="预算总价" align="center" prop="bdgTotlePrice" />
      <el-table-column
        label="交付时间"
        align="center"
        prop="delvTime"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.delvTime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="需求说明" align="center" prop="prodExplain" />
      <el-table-column label="采购人" align="center" prop="purchaser" />
    </el-table>
  </div>
</template>

<script>
import {} from "@/api/purs/planInfo";

export default {
  name: "PlanInfo",
  data() {
    return {
      planInfoList: [],
      planForm: {},
    };
  },
  created() {
    this.getList();
  },
  methods: {
    addPlanInfo() {
      let obj = {};
      obj.bgId = "";
      this.planInfoList.push(obj);
    },

    indexMethod(index) {
      // 根据需要自定义序号生成方式，这里只是简单返回索引+1
      return index + 1;
    },

    /** 查询采购商品信息列表 */
    getList() {},
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
  },
};
</script>
<style scoped>
.el-input input {
  border: none;
  outline: none;
  box-shadow: none;
}

.el-select {
  border: none;
  outline: none;
  box-shadow: none;
  font-weight: bold;
  color: black;
}

.el-input.is-disabled .el-input__inner {
  background-color: inherit; /* 继承父级背景色，或设置成你需要的颜色 */
  color: black;
  font-family: "仿宋";
  font-weight: bold;
}

.app-container > .el-input__inner{
  border-bottom: 1px solid red;
}
</style>
